<template name="sideNav">
	<aside class="sidebar sidebar--{{sidebarViewMode}} {{#if sidebarHideAvatar}}sidebar--hide-avatar{{/if}}" role="navigation">
		{{> sidebarHeader }}
		{{#if loggedInUser}}
			<div class="wrapper-unread">
				<div class="unread-rooms background-primary-action-color color-primary-action-contrast top-unread-rooms hidden">
					<i class="icon-up-big"></i> {{_ "More_unreads"}}
				</div>
			</div>
			<div class="rooms-list" aria-label="{{_ "Channels"}}" role="region">
				{{#each roomType}}
					{{> Template.dynamic template=template data=data }}
				{{/each}}
			</div>
			<div class="wrapper-unread">
				<div class="unread-rooms background-primary-action-color color-primary-action-contrast bottom-unread-rooms hidden">
					<i class="icon-down-big"></i> {{_ "More_unreads"}}
				</div>
			</div>
			<div class="flex-nav animated-hidden">
				{{> Template.dynamic template=flexTemplate data=flexData }}
			</div>
		{{else}}
			<div class="rooms-list" aria-label="{{_ "Channels"}}" role="region">
				<div class="wrapper">
					{{> roomList anonymous=true label="Channels" }}
				</div>
			</div>
		{{/if}}

		<footer class="sidebar__footer">{{{footer}}}</footer>
	</aside>
	<div class="sidebar-wrap"></div>
</template>
